<?
// mcGallery - Marc Cagninacci - marc@phpforums.net - http://www.phpforums.net

include './conf.inc.php';
include './header.php';
include './shadow.php';
include './lang/'.$lang;

$connect= mysql_connect($host,$login,$pass);
mysql_select_db($base, $connect);
$file= $album.'_'.$file;
$query= "UPDATE mcgallery SET visite=visite+1 WHERE file ='$file'";
mysql_query ($query);
$query="SELECT * FROM mcgallery WHERE file='$file'";
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$album=$row['idalbum'];
?>

<table border="0" cellspacing="1" cellpadding="5" align="center" bgcolor="black">
<tr>
<td align="center" bgcolor="black" colspan="2">
<font face="verdana" size="2" color="white">
<?
if ($row['title']!='') { echo stripslashes($row['title']); }
else { echo stripslashes($row['album']); }
  $len= strlen($album);
  $image= substr($row['file'], ($len + 1));
?>
</font></td>
</tr>
<tr>
<td bgcolor="white" align="center" colspan="2"><? echo shadow2($album, $image, $start); ?></td>
</tr>   
<?
if ($row['title']!='')
{
echo '<tr><td bgcolor="black" align="left" width="20%"><font face="verdana" size="1" color="white"><b>'.$l_Album.': </b></font></td>';
echo '<td bgcolor="black" align="left"><font face="verdana" size="1" color="white">'.stripslashes($row['album']).'</font></td></tr>';
echo '<tr><td bgcolor="black" align="left" width="20%"><font face="verdana" size="1" color="white"><b>'.$l_Titre.': </b></font></td>';
echo '<td bgcolor="black" align="left"><font face="verdana" size="1" color="white">'.stripslashes($row['title']).'</font></td></tr>';
}
if ($row['author']!='') 
{ 
echo '<tr><td bgcolor="black" align="left" width="20%"><font face="verdana" size="1" color="white"><b>'.$l_Auteur.': </b></font></td>';
echo '<td bgcolor="black" align="left"><font face="verdana" size="1" color="white">'.stripslashes($row['author']).'</font></td></tr>';
}
if ($row['descr']!='')
{
echo '<tr><td bgcolor="black" align="left" width="20%" valign="top"><font face="verdana" size="1" color="white"><b>'. $l_Description.': </b></font></td>';
$taille = GetImageSize('albums/'.$album.'/'.$image);
echo '<td bgcolor="black" align="left" width="'.($taille[0]/1.3).'"><font face="verdana" size="1" color="white">'.nl2br(stripslashes($row['descr'])).'</font></td></tr>';
}
?>

<tr><td bgcolor="black" align="center" colspan="2">
<font face="verdana" size="1"><a href="index.php?start=<? echo $start; ?>&album=<? echo $row['idalbum']; ?>" class="lien2"><? echo $l_Retour; ?></a></font>
</td>
</tr>
</table>
<?
include './footer.php';
?>
